﻿#ifndef _ADAPTER_API_H
#define _ADAPTER_API_H

#ifdef __cplusplus
extern "C" {
// #ifdef __cplusplus
#endif

#include <Windows.h>

// Api Adapter

typedef struct _Adapter_ApiParameterStruct {
    int authCode;
    int type;
    BOOL isRefresh;
    LPCSTR jsonMsg;
    LPCSTR robotWxid;
    LPCSTR groupWxid;
    LPCSTR fromWxid;
    LPCSTR picUrl;
    LPCSTR msg;
    LPCSTR iconUrl;
    LPCSTR path;
    LPCSTR toWxid;
    LPCSTR cardData;
    LPCSTR content;
    LPCSTR note;
    LPCSTR groupName;
    LPCSTR memberName;
    LPCSTR text;
    LPCSTR byteHex;
    LPCSTR name;
    LPCSTR memberWxid;
    LPCSTR title;
    LPCSTR friends;
    LPCSTR targetUrl;
    LPCSTR friendWxid;
} Adapter_ApiParameterStruct, *PAdapter_ApiParameterStruct;

typedef DWORD32 (*Adapter_ApiFunc)(PAdapter_ApiParameterStruct pApiParameterStruct);

typedef struct _Adapter_ApiFuncAndNameStruct {
    LPCSTR apiName;
    Adapter_ApiFunc apiFunc;
} Adapter_ApiFuncAndNameStruct, *PAdapter_ApiFuncAndNameStruct;

DWORD32 Adapter_CallApi(LPCSTR apiName, PAdapter_ApiParameterStruct pApiParameterStruct);
int Adapter_Initialize(int session, LPCSTR jsonStr);

#ifdef __cplusplus
}
// #ifdef __cplusplus
#endif

// #ifndef _ADAPTER_API_H
#endif
